class_name EventStateTransition
extends GameplayStateTransition

##
var target_state_name: String

##
var event_name: String

##
var on_transit_func: Callable


func _init(_target_state_name: String, init_event_name: String, init_on_transit_func: Callable) -> void:
    target_state_name = _target_state_name
    event_name = init_event_name
    on_transit_func = init_on_transit_func


func _try_condition() -> bool:
    return true


func _try_transition() -> String:
    return target_state_name


func _on_transit() -> void:
    on_transit_func.call()
